package by.siarhei.java.tij.reusing.exercises.ex04;

/**
 * (2) Prove that the base-class constructors are (a) always called and (b) called
 * before derived-class constructors.
 *
 * @author Siarhei Shchahratsou <s.siarhei@gmail.com>
 * @since 09.03.14
 */
public class Derived extends Base {
    public Derived() {
        System.out.println("Derived constructor");
    }

    public static void main(String[] args) {
        new Derived();
    }
}

class Base {
    Base() {
        System.out.println("Base constructor");
    }
}
